var express = require('express');
var router = express.Router();
var feblog = require('../controller/feblog.js')
/**
 * @swagger
 * definitions:
 *  articlelist:
 *     properties:
 *       id:
 *         type: integer
 *         description: 文章id
 *       title:
 *         type: string
 *         description: 文章标题
 *       introduce:
 *         type: string
 *         description: 文章简介
 *       addTime:
 *         type: integer
 *         description: 添加事件 10位时间戳
 *       view_count:
 *         type: integer
 *         description: 浏览次数
 *       typeName:
 *         type: string
 *         description: 文章类型
 * 
 *  article:
 *     properties:
 *       id:
 *         type: integer
 *         description: 文章id
 *       title:
 *         type: string
 *         description: 文章标题
 *       article_content:
 *         type: string
 *         description: 文章详情 解析过的markdown语法文章
 *       introduce:
 *         type: string
 *         description: 文章简介
 *       addTime:
 *         type: integer
 *         description: 添加事件 10位时间戳
 *       view_count:
 *         type: int
 *         description: 查看次数
 *       typeName:
 *         type: string
 *         description: 文章类型
 *       typeId:
 *         type: integer
 *         description: 文章类型id
 */
/**
 * @swagger
 * /api/feblog/getArticleList:
 *   get:
 *     tags:
 *       - 前台博客
 *     description: 返回所有文章列表
 *     produces:
 *       - application/json
 *     responses:
 *       200:
 *         description: 涵盖所有文章列表信息的数组
 *         schema:
 *           $ref: '#/definitions/articlelist'
 */
/* GET home page. */
/**
 * @swagger
 * /api/feblog/getArticleById:
 *   get:
 *     tags:
 *       - 前台博客
 *     description: 返回所有文章列表
 *     produces:
 *       - application/json
 *     parameters:
 *       - name: articleID
 *         description: 文章的id
 *         in: query
 *         required: true
 *         type: integer
 *     responses:
 *       200:
 *         description: 涵盖所有文章列表信息的数组
 *         schema:
 *           $ref: '#/definitions/article'
 */
/**
 * @swagger
 * /api/feblog/getArticleType:
 *   get:
 *     tags:
 *       - 前台博客
 *     description: 文章类别 那四个重点
 *     produces:
 *       - application/json
 *     responses:
 *       200:
 *         description: 文章类别的数组
 *         schema:
 *           $ref: '#/definitions/article'
 */
router.get('/api/feblog/getArticleList', feblog.getArticleList);
router.get('/api/feblog/getArticleById', feblog.getArticleById)
router.get('/api/feblog/getArticleType', feblog.getArticleType)

module.exports = router;
